<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>表单</title>
	</head>
	<body>
		<form>
			<div>
				<label>用户名：</label>
				<input type="text" name="username" placeholder="请输入用户名"/>
			</div>
			<div>
				<label>密码：</label>
				<input type="password" name="password" placeholder="请输入密码"/>
			</div>
			<div>
				<!-- value属性修改按钮的名称 -->
				<input type="submit" value="登录"/>
				<input type="reset" value="重置"/>
			</div>
		</form>
		<hr/>
		
		<form>
			<div>
				<!-- 隐藏控件 -->
				<input type="hidden" value="1"/>
				<input type="text" value="1" hidden/>
			</div>
			<div>
				<label>姓名：</label>
				<!-- 必填 -->
				<input type="text" name="name" value="张三" 
					readonly required/>
			</div>
			<div>
				<label>简介：</label>
				<textarea disabled rows="4" name="description"></textarea>
			</div>
			<div>
				<label>性别：</label>
				<!-- 多个radio需要设置同样的name属性值 -->
				<input type="radio" name="sex" value="boy"/>男
				<input type="radio" name="sex" value="girl" checked/>女
			</div>
			<div>
				<label>爱好：</label>
				<input type="checkbox" name="hobby" value="code"/>编程
				<input type="checkbox" name="hobby" value="run"/>跑步
				<input type="checkbox" name="hobby" value="game"/>游戏
			</div>
			<div>
				<label>班级号：</label>
				<select name="grade">
					<option value="20224128" selected>8班</option>
					<option value="20224129">9班</option>
				</select>
			</div>
			<div>
				<label>王者荣耀段位：</label>
				<select name="duanwei">
					<optgroup label="入门">
						<option value="qingtong">青铜</option>
						<option value="baiyin">白银</option>
						<option value="huangjin">黄金</option>
					</optgroup>
					<optgroup label="精英">
						<option value="bojin" selected>铂金</option>
						<option value="zuanshi">钻石</option>
					</optgroup>
					<optgroup label="大神">
						<option value="xingyao">星耀</option>
						<option value="wangzhe">王者</option>
					</optgroup>
				</select>
			</div>
			<div>
				<label>附件：</label>
				<input type="file" name="fujian"/>
			</div>
			<div>
				<label>生日：</label>
				<input type="date" value="birtyday"/>
			</div>
			<div>
				<input type="submit" value="提交"/>
			</div>
		</form>
	</body>
</html>